﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Xiaov.SmartWeb.Model;
using Xiaov.SmartWeb.Infrastructure.ExtMethod;
using Xiaov.SmartWeb.Model.ActiveRecord;

namespace Xiaov.SmartWeb.Application.PluginSrc.StatisticalSystem.ReportDesign.Json
{
    public partial class ManageDeptList : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //用户管辖的单位
            string dwbm = PUser.USERDEPT;
            Response.Clear();
            DWBMB danwei = new DWBMB();
            IList<DWBMB> list = danwei.FindAllByCache();
            list = list.Where(s => s.DWBM.StartsWith(dwbm)&&s.DWBM.Length<=4).OrderBy(s=>s.XSSX).ToList();
            Response.Write(list.ToJsonForComboGrid());
            Response.End();
        }
    }
}